using MicroMsg.Common.Event;
using MicroMsg.Common.Utils;
using MicroMsg.Scene;
using System;
namespace MicroMsg.Plugin.Sns.Scene
{
	public class SnsOpService
	{
		private const string TAG = "SnsOpService";
		private static EventWatcher mWatcher;
		private static SnsOpService _mInstance;
		public static SnsOpService Init()
		{
			if (SnsOpService._mInstance == null)
			{
				SnsOpService._mInstance = new SnsOpService();
			}
			return SnsOpService._mInstance;
		}
		public SnsOpService()
		{
			SnsOpService.mWatcher = new EventWatcher(this, null, new EventHandlerDelegate(this.HandlerDoScene));
			EventCenter.registerEventWatcher(EventConst.ON_NETSCENE_SYNC, SnsOpService.mWatcher);
		}
		private void HandlerDoScene(EventWatcher watcher, BaseEventArgs evtArgs)
		{
			NetSceneSyncResult netSceneSyncResult = evtArgs.mObject as NetSceneSyncResult;
			if (netSceneSyncResult == null)
			{
				Log.smethod_1("SnsOpService", "NetSceneSyncResult == null");
				return;
			}
			if (netSceneSyncResult.syncStatus == SyncStatus.syncEnd && netSceneSyncResult.isAppActive)
			{
				Log.smethod_5("SnsOpService", "onHander sync event result.syncStatus = " + netSceneSyncResult.syncStatus);
			}
		}
	}
}
